﻿<%@ Page Title="" Language="C#" MasterPageFile="~/trangchu.master" AutoEventWireup="true" CodeFile="SanPhamTheoLoai.aspx.cs" Inherits="SanPhamTheoLoai" %>
<%@ Register assembly="CollectionPager" namespace="SiteUtils" tagprefix="cc1" %>

<%--<%@ Register Assembly="CollectionPager" Namespace="SiteUtils" TagPrefix="cc1" %>--%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style7
        {
        }
        .style8
        {
            width: 32px;
            height: 32px;
        }
        .style9
        {
            width: 100px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table bgcolor="White" style="width:100%;" width="600px">
        <tr>
            <td bgcolor="Red" style="text-align: center; color: #FFFFFF; font-weight: 700;">
                Sản Phẩm</td>
        </tr>
        <tr>
            <td>
                <%--<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:COMPUTERConnectionString %>" 
                    SelectCommand="SELECT [MaSP], [TenSP], [MaDM], [Gia], [Hinh], [MieuTa] FROM [SanPham] WHERE ([MaDM] = @MaDM)">
                    <SelectParameters>
                        <asp:QueryStringParameter Name="MaDM" QueryStringField="MaDM" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>--%>
                <asp:DataList ID="dtlSanPham" runat="server" DataKeyField="MaSP" RepeatColumns="2" 
                    RepeatDirection="Horizontal" BackColor="#CCCCCC" BorderColor="#999999" 
                    BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" 
                    ForeColor="Black" GridLines="Both" Width="100%">
                    <FooterStyle BackColor="#CCCCCC" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <ItemStyle BackColor="White" />
                    <ItemTemplate>
                        <table style="width:100%;">
                            <tr>
                                <td rowspan="4" style="text-align: center" class="style9">
                                    <asp:Image ID="Image1" runat="server" Height="100px" 
                                        ImageUrl='<%# "~/Upload/" + Eval("Hinh") %>' Width="100px" />
                                </td>
                                <td class="style7">
                                    <asp:Label ID="TenSPLabel" runat="server" Text='<%# Eval("TenSP") %>' />
                                </td>
                            </tr>
                            <tr>
                                <td class="style7">
                                    <asp:Label ID="MieuTaLabel" runat="server" Text='<%# Eval("MieuTa") %>' />
                                </td>
                            </tr>
                            <tr>
                                <td class="style7">
                                    Giá:
                                    <asp:Label ID="GiaLabel" runat="server" Text='<%# Eval("Gia") %>' 
                                        ForeColor="Red" />
                                </td>
                            </tr>
                            <tr>
                                <td class="style7">
                                    <img alt="" class="style8" src="Images/Giohang.gif" />
                                    <asp:HyperLink ID="HyperLink1" runat="server" 
                                        NavigateUrl='<%# "~/GioHang.aspx?MaSP="+Eval("MaSP") %>' 
                                        style="font-weight: 700; color: #0000FF">Mua Hàng</asp:HyperLink>
                                </td>
                            </tr>
                        </table>
<br />
                    </ItemTemplate>
                    <SelectedItemStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                </asp:DataList>
                <center> <cc1:CollectionPager ID="CollectionPager2" runat="server" BackText="« Trước" 
                    FirstText="Đầu" LabelText="Trang:" LastText="Cuối" NextText="Sau »" 
                    ResultsFormat="Kết quả từ {0}-{1} (của {2}) bài viết" ShowFirstLast="True" 
                    SliderSize="10" PagingMode="PostBack" BackNextDisplay="Buttons" 
                    BackNextLinkSeparator="·" HideOnSinglePage="True" IgnoreQueryString="False" 
                    PageNumbersDisplay="Numbers" PageSize="10" ResultsLocation="Top" 
                    SectionPadding="10" ShowLabel="True" ShowPageNumbers="True" UseSlider="True" 
                        BackNextLocation="Split" LabelStyle="" ControlStyle="color:white" 
                        PageNumbersStyle="color:orange" PageNumberStyle=""></cc1:CollectionPager></center> 


                <br />
            </td>
        </tr>
    </table>

</asp:Content>

